package com.zhongjinkang.rhythm.uiBean

import androidx.databinding.BaseObservable
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide
import com.google.android.material.imageview.ShapeableImageView
import com.zhongjinkang.rhythm.R

open abstract class BaseBean: BaseObservable() {


    companion object {
        @JvmStatic
        @BindingAdapter("imageUrl")
        fun loadImage(imageView: ShapeableImageView, url: String) {
            Glide.with(imageView.context).load(url)
                .placeholder(R.mipmap.ic_launcher_round)
                .into(imageView);
        }
    }
}